home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / mask12.arc / STATLIN.INC < prev    next >
Text File  |  1988-01-02  |  1KB  |  48 lines

  1. '** STATLIN.INC : This routine display and updates the status of the
  2. '   insert, caps, num lock, scroll lock keys.
  3. '        skcolor% = background*16 + foreground
  4. '            statrow% = row to display status line
  5. '            statcol% = the starting column. The routine will figure spacing
  6. '                   automatically.
  7. ' USAGE :
  8. 'TOP:
  9. '           DO
  10. '               A$ = INKEY$
  11. '               CALL KEYSTATLINE(95,25,60)
  12. '           LOOP WHILE A$ = ""
  13. '           IF ASC(A$) = 27 THEN END
  14. '    GOTO TOP
  15.  
  16. sub keystatline(skcolor%,statrow%,statcol%) static
  17.    ' CALL GetKbd(insert%, caps%, numlk%, scrl%)
  18.     DEF SEG = &H40
  19.     STATUSBYTE = PEEK(&H17)
  20.     INSERT% = STATUSBYTE AND &H80
  21.     CAPS% = STATUSBYTE AND &H40
  22.     NUMLK% = STATUSBYTE AND &H20
  23.     SCRL% = STATUSBYTE AND &H10
  24.     DEF SEG
  25.     if insert% <> 0 then
  26.         CALL XQPRINT(chr$(179)+" INS ",statrow%,statcol%,skcolor%,0)
  27.         IF insert% <> 0 THEN LOCATE ,,,1,14
  28.     ELSE
  29.         CALL XQPRINT(chr$(179)+"     ",statrow%,statcol%,skcolor%,0)
  30.         LOCATE ,,,5,7
  31.     END IF
  32.     IF caps% <> 0 THEN
  33.         CALL XQPRINT("CAPS ",statrow%,statcol%+6,skcolor%,0)
  34.     ELSE
  35.         CALL XQPRINT("     ",statrow%,statcol%+6,skcolor%,0)
  36.     END IF
  37.     IF numlk% <> 0 THEN
  38.         CALL XQPRINT("NMLK ",statrow%,statcol%+11,skcolor%,0)
  39.     ELSE
  40.         CALL XQPRINT("     ",statrow%,statcol%+11,skcolor%,0)
  41.     END IF
  42.     IF scrl% <> 0 THEN
  43.         CALL XQPRINT("SCRL",statrow%,statcol%+16,skcolor%,0)
  44.     ELSE
  45.         CALL XQPRINT("    ",statrow%,statcol%+16,skcolor%,0)
  46.     END IF
  47. end sub
  48.